package com.cloud.product.interceptor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

/**
 * @author 韩先楚
 */
@Component
public class XTokenInterceptor implements RequestInterceptor {


    //openfeign调用时，在请求头中添加token openfeign发送请求的拦截器
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("X-Token", "xxxxx");
    }
}
